package com.axx.android.profile.kettle;

import android.support.annotation.LayoutRes;
import android.support.annotation.Nullable;

import com.axx.android.R;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;


/**
 * Created by Administrator on 2017/8/2 0002.
 */

public class WaterLogAdapter extends BaseQuickAdapter<WaterLog.WaterLogBean, BaseViewHolder> {
    public WaterLogAdapter(@LayoutRes int layoutResId, @Nullable List<WaterLog.WaterLogBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, WaterLog.WaterLogBean item) {
        helper.setText(R.id.tv_user, item.getFromUser().getNickName());
        helper.addOnClickListener(R.id.tv_user);
        String content = "赠送了你邮票 +" + item.getEnergy() + "\t\t\t" + item.getWaterTime().substring(5,item.getWaterTime().length() - 3);
        helper.setText(R.id.tv_content, content);
    }
}
